#实例11
#函数内使用global nonlocal
# num = 1
# def outer():
#
#     def inner():
#         #nonlocal num
#         global num
#         num = 2
#         print('inner函数中num的值',num)
#     inner()
#     print('outer函数中num的值',num)
# outer()
# print('全局',num)


add = lambda x, y: x + y
result = add(1, 2)
print(result)

# iuj0-9

def add(x, y):
    return x + y
result1 = add(1, 2)
print(result1)

